#include <iostream>

using namespace std;

class Recursion
{
public:
    //n! = n * (n-1)...*2*1
    inline long factorial(int n) {
        if (n <= 1) {
            return 1;
        }
        return n * factorial(n-1);
    }

    //f(0) = fi(1) = 1, f(n) = f(n-1) + f(n-2)
    inline long fibonacci(int n) {
        if (n <= 1) {
            return 1;
        }
        return fibonacci(n-1) + fibonacci(n-2);
    }
};

int main(int argc, char** argv)
{
    int n = 0;
    if (argc >= 2) {
       n = atoi(argv[1]); 
    }
    Recursion r;
    long fac = r.factorial(n);
    long fib = r.fibonacci(n);
    cout << "fac: " << n << "\t" << fac << endl; 
    cout << "fib: " << n << "\t" << fib << endl; 

    return 0;
}
